Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Try alternative process name if cluster could not be formed #11866

Closed

Conversation

alexnkdev
Copy link

Proposed Changes

Retry cluster creation with alternative name, if replica process name conflicts between queues in different virtual hosts.

Fixes #11038

Types of Changes

What types of changes does your code introduce to this project?

Checklist

  • I have read the CONTRIBUTING.md document
  • I have signed the CA (see https://cla.pivotal.io/sign/rabbitmq)
  • I have added tests that prove my fix is effective or that my feature works
  • All tests pass locally with my changes
  • If relevant, I have added necessary documentation to https://github.com/rabbitmq/rabbitmq-website
  • If relevant, I have added this change to the first version(s) in release-notes that I expect to introduce it

@michaelklishin
Copy link
Member

The Actions failures have to do with secret access for external contributions. We will run the tests as part of the QA process, don't sweat it.

@michaelklishin
Copy link
Member

@alexnkdev can you please rebase this PR on top of main? Then I will submit a PR so that the suites do run. Your commits will still be credit to you, of course.

@alexnkdev alexnkdev force-pushed the queue_name_alternative_strategy branch from 58b8c9d to 5d94a4f Compare July 31, 2024 21:04
@alexnkdev alexnkdev force-pushed the queue_name_alternative_strategy branch from 5d94a4f to 1be524a Compare July 31, 2024 21:23
@alexnkdev
Copy link
Author

@michaelklishin done

Copy link
Member

@michaelklishin michaelklishin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is an xref failure:

Undefined function rabbit_queue_type_util:name_concat/1 called by rabbit_quorum_queue:start_cluster/1

And indeed, name_concat/1 is not exported.

AlternativeRaName = rabbit_data_coercion:to_atom(ra:new_uid(rabbit_queue_type_util:name_concat(QName))),
rabbit_log:debug("Could not form cluster ~ts, trying alternative name ~ts",
[RaName, AlternativeRaName]),
case internal_declare(Q, AlternativeRaName, LeaderNode, FollowerNodes) of
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't handle every error internal_declare/4 can return.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it also doesn't handle the partial case where there is a name conflict in a minority subset of the members.

@michaelklishin
Copy link
Member

michaelklishin commented Aug 2, 2024

To run xref and Dialyzer, use

bazel test //deps/rabbit:xref
bazel test //deps/rabbit:dialyze

with Bazel or

cd deps/rabbit
gmake xref
# gmake dialyze is broken with Make IIRC

@michaelklishin
Copy link
Member

This cannot be merged due to an xref failure (a function that does not exist is called) and #11866 (comment).

Closing after a few weeks without any activity.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Quorum queue replica Erlang process names can conflict between queues in different virtual hosts
3 participants